package com.xindz.hgq.main;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

import com.blankj.utilcode.util.ActivityUtils;
import com.xindz.hgq.R;
import com.xindz.hgq.base.BaseFragment;
import com.xindz.hgq.base.options.BaseFragmentOptions;
import com.xindz.hgq.fragment.DefaultFragmetActivity;
import com.xindz.hgq.fragment.LazyFragmentActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;

/**
 * @name HGQBase
 * @class name：com.xindz.hgq.main.view
 * @describe describe
 * @anthor XINDZ
 * @time 2018/1/15 17:17
 * @change
 * @chang time
 * @class describe
 */
public class ThreeFragment extends BaseFragment {
    @BindView(R.id.bt_home_three_default)
    Button btHomeThreeDefault;
    @BindView(R.id.bt_home_three_lazy)
    Button btHomeThreeLazy;
    Unbinder unbinder;

    @Override
    public BaseFragmentOptions setOption() {
        return null;
    }

    @Override
    public int onCreateFragmentLayoutId() {
        return R.layout.fragment_home_three;
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        // TODO: inflate a fragment view
        View rootView = super.onCreateView(inflater, container, savedInstanceState);
        unbinder = ButterKnife.bind(this, rootView);
        return rootView;
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        unbinder.unbind();
    }

    @OnClick({R.id.bt_home_three_default, R.id.bt_home_three_lazy})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.bt_home_three_default:
                ActivityUtils.startActivity(DefaultFragmetActivity.class);
                break;
            case R.id.bt_home_three_lazy:
                ActivityUtils.startActivity(LazyFragmentActivity.class);
                break;
        }
    }
}
